package ship;

import board.Direction;
import board.ICoordinate;

/**
 * @author tymoshya
 * @since 8/4/11
 */
public interface IShip {

    /**
     * Destroys one deck each time the ship is shot
     */
    void looseDeck();

    /**
     * Returns the number of available ship decks
     *
     * @return decks available
     */
    int getDecksAliveCount();

    /**
     * Returns true, if the ship is alive
     *
     * @return true, if decksAlive > 0
     */
    boolean isAlive();

    /**
     * @return ship's first deck firstCoordinate
     */
    ICoordinate getFirstCoordinate();

    /**
     * @return ship's last deck firstCoordinate
     */
    ICoordinate getLastCoordinate();

    /**
     * @return coordinates of all ship's decks
     */
    ICoordinate[] getCoordinates();

    /**
     * Returns the ship's direction (horizontal or vertical)
     *
     * @return the ship's direction
     */
    Direction getDirection();

    /**
     * Returns the initial number of decks (e.g. 2 for ShipTwoDeck)
     *
     * @return the (constant) number of decks
     */
    int getDefaultDecksCount();
}
